//
//  MovieDataModel.h
//  ShowTimeApp
//
//  Created by Ruby on 11/6/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BaseDataModel.h"
#import "Movie.h"
#import "CinemaService.h"

@interface MovieDataModel : BaseDataModel {
    
}
//Khoi tao CinemaDataModel
-(id)initMovieDataModel;
//Them 1 object (Movie) vao data model
-(void)insertObject:(id)movie;
//Them 1 danh sach cac objetc vao data model
-(void)insertObjects:(NSMutableArray *)movieList;
//Lay toan bo movie va sap xep tang theo Name
-(NSMutableArray*)getAllMovieSortByTitleAscending;
//Lay toan bo movie theo cinemaID va sap xep tang theo Name
-(NSMutableArray*)getAllMoviesByCinemaSortByTitleAscending:(int) cinemaID;
//Lay chi tiet movie
-(Movie*)getDetailByID:(int) ID;
//Xoa toan bo danh sach cinema
-(void)deleteAll;
//Chuyen doi kieu object tu kieu service entity sang Movie (data model)
+(Movie*)convertFromCinemaService_MovieEntity:(CinemaService_MovieEntity*)svMovieEntity TodbMovieEntity:(Movie*)dbMovieEntity;
//Ham xuat danh sach movie de test
-(void)output:(NSMutableArray*)movieList;
@end
